//
//  HJIconTextCell.m
//  KaiChat
//
//  Created by lx on 2023/10/18.
//

#import "HJIconTitleCell.h"



@implementation HJIconTitleCell {
    UIImageView *__weak _iconImageView;
    UIImageView *__weak _arrowImageView;
    UIView *__weak _lineView;
    UILabel *__weak _titleLabel;
}


- (void)settingSubView {
 
    
    self.backgroundColor = UIColor.clearColor;

    _iconImageView = [UIImageView addToView:self.contentView];
    [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(leftRightMargin);
        make.centerY.offset(0);
    }];
    
    _titleLabel = [UILabel lableWithSuperView:self.contentView font:UIFontMake(14) color:UIColor.tj_333333Color title:nil textAlignment:NSTextAlignmentLeft];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(50);
        make.centerY.offset(0);
    }];
 
    _lineView = [UIView addToView:self.contentView];
    _lineView.backgroundColor = [UIColor.tj_CCCCCCColor colorWithAlphaComponent:0.2];
    [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.offset(0);
        make.bottom.offset(0);
        make.height.offset(lineHeight);
    }];
    
}

- (void)setModel:(HJCellModel *)model {
    _model = model;

    _iconImageView.image = [UIImage imageNamed:model.iconName];
    _titleLabel.text = model.text;
    _lineView.hidden = !model.showLine;
}
 

@end

